/*
 * @Description:
 * @Author: ruanyuesheng
 * @Date: 2021-07-08 23:32:55
 * @LastEditTime: 2022-04-08 10:22:30
 * @LastEditors: r_yuesheng
 */
import React, { useState, useEffect } from 'react';
import { useTranslation } from 'react-i18next';
function Example() {
  const { t, i18n } = useTranslation();
  // 声明一个叫 “count” 的 state 变量。
  const [count, setCount] = useState(0);
  useEffect(() => {
    // Update the document title using the browser API
    document.title = `我点击了${count}次`;
  });
  return (
    <div>
      <p>我点击了{count}次</p>
      <button onClick={() => setCount(count + 1)}>点击</button>
      <p>{t('footer.detail')}</p>
    </div>
  );
}
export default Example;
